var axios = require('axios');
var http = require('http');
http.createServer((req,res)=>{
    res.writeHead(200, {'Content-Type': 'text/html; charset=utf-8'});
    
    axios.get("http://localhost:8089")
    .then(data=>{
        console.log(data.data.message);
        let arr = data.data.data;
        arr = arr.filter((item)=>{
            return item.age>30;
        })
        let obj = {
            count : arr.length,
            data : arr
        }
        res.write(JSON.stringify(obj));
        res.end();
    })
    .catch(error=>{
        console.log(error);
    });
}).listen('8088')
console.log('ewee');